--
-- Author: dbliu
-- Date: 2014-02-26 22:35:29
--

local EM = import("..EM")
local EMEnemy = class("EMEnemy", EM)


EMEnemy.schema = clone(EM.schema)
EMEnemy.schema["blood"] = {"number", 1}

function EMEnemy:ctor(properties, event, callbacks)

	-- 设计状态机的默认回调
	local defaultCallbacks = {
		
		onkill = handler(self, self.onKill),
	}

	-- 如果继承类提供了其他回调，则合并
	table.merge(defaultCallbacks,totable(callbacks))

	EMEnemy.super.ctor(self,properties, event, defaultCallbacks)
end


function EMEnemy:getBlood()
	return self.blood_
end

function EMEnemy:setBlood( blood )
	self.blood_=blood
end



return EMEnemy